<script setup>
const props = defineProps({
  formProps: {
    type: Object,
    default: () => ({})
  }
});
</script>

<template>
  <view class="w-label-text" :style="props.formProps.showBgc ? `background: ${props.formProps.color}20` : ''" style="margin-top: 10rpx">
    <span :style="{ background: props.formProps.color }"></span>
    <text>{{ $t(props.formProps.content) }}</text>
  </view>
</template>

<style scoped>
.w-label-text {
  display: flex;
  width: 100%;
  align-items: center;
}

.w-label-text span:first-child {
  display: inline-block;
  width: 5px;
  height: 30px;
  border-radius: 2px;
  margin-right: 5px;
}
</style>